Skip to content

Conversation

@Shadow243
Copy link
Member

As discussed with @kroky via telegram, we aim to minimize the number of Sieve server reconnections to improve the block page performance.

@Shadow243 Shadow243 marked this pull request as draft August 9, 2025 00:14
@Shadow243 Shadow243 force-pushed the refactor-block-list branch from ba383bf to 38a786b Compare August 25, 2025 19:42
@Shadow243 Shadow243 force-pushed the refactor-block-list branch from 38a786b to 760827b Compare August 25, 2025 19:43
@Shadow243 Shadow243 force-pushed the refactor-block-list branch from 760827b to 115c4e1 Compare August 25, 2025 19:45
@Shadow243
Copy link
Member Author

@kroky this is now working with Postale. Could you please review it when you have a chance?

@Shadow243 Shadow243 force-pushed the refactor-block-list branch 8 times, most recently from 29f0f60 to 1a64c68 Compare September 7, 2025 01:09
$servers[$id] = $s;
}
}
SieveService::init($this->cache, $servers);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can init once in a module and reuse the module whenever you need it.

@Shadow243 Shadow243 force-pushed the refactor-block-list branch 9 times, most recently from 7c5e3ed to ed606d9 Compare September 13, 2025 02:56
@Shadow243
Copy link
Member Author

@christer77 @Baraka24 @IrAlfred I've implemented some enhancements on the block_list page. Please take some time to test them before @kroky proceeds with the review.

@Shadow243 Shadow243 marked this pull request as ready for review September 16, 2025 17:18
@Baraka24
Copy link
Member

Thanks @Shadow243 for this big work, we took the time to test differently and here are what we fund:

  • when at ?page=block_list, and connecting with IMAP SESSION_TYPE(.env configured IMAP to log in), we were getting :
Sieve: Failed to get Sieve scripts for server '68b9aa55b0378': Socket creation failed: php_network_getaddresses: getaddrinfo for tls failed: Temporary failure in name resolution

We expected that this should be coming from tls config along side IMAP_AUTH_TLS, then we tried to connect using DB SESSION_TYPE, and here trying to login(no account configured) we got:

- Uncaught TypeError: array_filter(): Argument #1 ($array) must be of type array, false given in /var/www/html/cypht/modules/sievefilters/functions.php:19
Stack trace:
#0 /var/www/html/cypht/modules/sievefilters/functions.php(19): array_filter()
#1 /var/www/html/cypht/modules/sievefilters/modules.php(64): ensure_sieve_service_initialized()
#2 /var/www/html/cypht/lib/modules_exec.php(177): Hm_Handler_sieve_filters_enabled->process()
#3 /var/www/html/cypht/lib/modules_exec.php(155): Hm_Module_Exec->run_handler_module()
#4 /var/www/html/cypht/lib/dispatch.php(218): Hm_Module_Exec->run_handler_modules()
#5 /var/www/html/cypht/lib/dispatch.php(188): Hm_Dispatch->process_request()
#6 /var/www/html/cypht/index.php(55): Hm_Dispatch->__construct()
#7 {main}
  thrown in /var/www/html/cypht/modules/sievefilters/functions.php on line 19
  • note also, only unblock sender action is working at ?page=block_list, other ones are not working.

@Baraka24
Copy link
Member

One more thing to note, please deal with caches, it is likely the updated block_list content are cached, to see updates we have to clear all caches, logout and login again the find the updates as well. Please check also as this a part of performance.

@Shadow243
Copy link
Member Author

Thanks @Shadow243 for this big work, we took the time to test differently and here are what we fund:

  • when at ?page=block_list, and connecting with IMAP SESSION_TYPE(.env configured IMAP to log in), we were getting :
Sieve: Failed to get Sieve scripts for server '68b9aa55b0378': Socket creation failed: php_network_getaddresses: getaddrinfo for tls failed: Temporary failure in name resolution

We expected that this should be coming from tls config along side IMAP_AUTH_TLS, then we tried to connect using DB SESSION_TYPE, and here trying to login(no account configured) we got:

- Uncaught TypeError: array_filter(): Argument #1 ($array) must be of type array, false given in /var/www/html/cypht/modules/sievefilters/functions.php:19
Stack trace:
#0 /var/www/html/cypht/modules/sievefilters/functions.php(19): array_filter()
#1 /var/www/html/cypht/modules/sievefilters/modules.php(64): ensure_sieve_service_initialized()
#2 /var/www/html/cypht/lib/modules_exec.php(177): Hm_Handler_sieve_filters_enabled->process()
#3 /var/www/html/cypht/lib/modules_exec.php(155): Hm_Module_Exec->run_handler_module()
#4 /var/www/html/cypht/lib/dispatch.php(218): Hm_Module_Exec->run_handler_modules()
#5 /var/www/html/cypht/lib/dispatch.php(188): Hm_Dispatch->process_request()
#6 /var/www/html/cypht/index.php(55): Hm_Dispatch->__construct()
#7 {main}
  thrown in /var/www/html/cypht/modules/sievefilters/functions.php on line 19
  • note also, only unblock sender action is working at ?page=block_list, other ones are not working.

Fixed 7a0bea3

@marclaporte
Copy link
Member

@Shadow243 This branch has conflicts that must be resolved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants